package com.darrenchan

object TryDemo {
  def main(args: Array[String]): Unit = {
    val result_try = try {
      Integer.parseInt("dog")
    } catch {
      case _ => 0
    } finally {
      println("always be printed")
    }
    println(result_try)

    val code = 3
    val result_match = code match {
      case 1 => "one"
      case 2 => "two"
      case _ => 777
    }
    println(result_match)
  }
}
